package num;
import java.util.Scanner;
public class  num{
	

public static void main(String[] args) {
	System.out.println("请输入,每次输入信息用回车确认"); 
	System.out.println("最后输入一个“#”号结束输入操作"); 
	Scanner reader = new Scanner(System.in); 
	 
	 while(!reader.hasNext("#")){		     
     if(reader.hasNextInt()) {
    	 String num1 = reader.next();
    	 String num2 = reader.next();
    	 int number1 = Integer.parseInt(num1);
    	 int number2 = Integer.parseInt(num2);
    	 int t = number1 + number2;
    	 System.out.println("整数\n"+t);
     }
     else if(reader.hasNextDouble()) {
    	 String num1 = reader.next();
    	 String num2 = reader.next();
    	 double number1 = Double.parseDouble(num1);
    	 double number2 = Double.parseDouble(num2);
    	 double t = number1 + number2;
    	 System.out.println("小数\n"+t);
     }
     else if(reader.hasNext()) {
    	 String num1 = reader.next();
    	 String num2 = reader.next();
    	 int number1 = Integer.parseInt(num1);
    	 String t = number1 + num2;
    	 System.out.println("字符型\n"+t);
  }  
}
}
}